﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/PagePlaceMaster.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
<style type="text/css">
    div.newblog
     { 
         font-size: 20px; 
         line-height: 28px; 
         color: #0c5d18; 
         text-transform: none;  
         font-weight: bold; 
         border-bottom:1px dashed #999;
         padding-bottom: 5px; 
      }
      div.newblog a:hover{ text-decoration:none;}
</style>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<!-- breadcrumbs -->
<div class="breadcrumbs">
	<div class="shell">
		<p>因为专注，所以专业</p>
		<h2 style="float:left;">
        <img src="/Content/images/DocumentPenFile.png" style="width:40px;height:40px;float:left;" />
        <div style="margin-top:10px;">官方博客</div>
        </h2>
	</div>
</div>
<!-- end breadcrumbs -->
<!-- main -->
<div id="main">
	<div class="shell">
		
		<!-- content -->
		<div id="content" class="left">
            <%if(Convert.ToInt32(ViewData["Status"])>=2)
              { %>
			<div  class="newblog">
            <a href="/Home/NewBlog"><img src="/Content/images/newbolg.png" style="width:40px;height:40px; " />
            <font style="font-family:Courier New;font-size:18px; font-weight:bold;color: #187d1d;">写博客</font>
            </a>
            </div> 
            <%} %>
            <%var list = (List<DefaultDataPack>)ViewData["Articles"];
                foreach(var item in list)
                {
               %>
			<!-- blog entry -->
			<div class="blog-entry">
				<div class="entry">
					<h2 class="title"><a style="text-decoration:none;" href="/Home/Article/<%=item.ID %>"><%=item.TITLE %></a></h2>
					<div class="entry_details">
						<span class="date"><%=item.DATE %></span>
						<span class="author"><%=item.AUTHOR %></span>
						<a href="#" class="comments"><%=item.REPLYTIME %> comments</a>
						<div class="cl">&nbsp;</div>
					</div>
					<div class="main-image">
						<img src="<%=item.URL %>" alt="" />
					</div>
					<p><%=item.ABSTRACT %></p>
					<a href="/home/article/<%=item.ID %>" class="read-more">查看</a>
				</div>
			</div>
			<!-- end blog entry -->
			<%} %>
			
			<!-- pagination -->
			<%=ViewData["pagination"]%>
			<!-- end pagination -->
			
		</div>
		<!-- end content -->
		
		<!-- sidebar -->
		<div id="sidebar" class="right">
			
			<!-- sidebar widget -->
			<div class="entry sidebar-widget">
				<h2 class="title">Categories</h2>
				<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc ornare consequat .</p>
				<ul>
				    <li><a href="#">Lorem ipsum dolor sit amet</a></li>
				    <li><a href="#">Consectetuer adipiscing elit</a></li>
				    <li><a href="#">Proin sed odio et ante adipiscing</a></li>
				    <li><a href="#">Mazim sensibus et usu</a></li>
				    <li><a href="#">Nulla dignisim rutrum eleifen</a></li>
				</ul>
			</div>
			<!-- end sidebar widget -->
			
			<!-- popular posts widget -->
			<div class="entry">
				<h2 class="title">Popular Posts</h2>
                <%var popular = (List<DefaultDataPack>)ViewData["Popular"];
                    int count = popular.Count;
                    for (int i = 0; i < count; i++)
                    { 
                        if(i == count -1)
                        {%>
                        <div class="popular-post-item">
                        <%}
                        else
                        { %>
                        <div class="popular-post-item popular-post-item-last">
                      <%} %>
                              <a href="/Home/Blog/<%=popular[i].ID %>" class="thumb"><img src="<%=popular[i].URL %>" alt="" /></a>
					        <div class="text-holder">
						        <a href="/Home/Blog/<%=popular[i].ID %>"><%=popular[i].TITLE %></a>
						        <span><%=popular[i].DATE %></span>
					        </div>
					        <div class="cl">&nbsp;</div>
				        </div>
                  <%} %>
			</div>
			<!-- end popular posts widget -->
			
			<!-- archive widget -->
			<div class="entry">
				<h2 class="title">最新博文</h2>
				<ul class="archive-list">
                <%var newarticles = (List<DefaultDataPack>)ViewData["NewArticles"];
                    foreach (var item in newarticles)
                  { %>
                  <li><a href="/Home/Article/<%=item.ID %>"><%=item.TITLE %>  <span>(<%=item.REPLYTIME %>)</span></a></li>
                <%} %>
				</ul>
			</div>
			<!-- end archive widget -->
			
				<!-- feature-in widget -->
			<div class="entry">
				<h2 class="title">Featured In</h2>
				<a href="http://cssmayo.com/" class="left css_mayo"></a>
				<a href="http://www.netmag.co.uk/" class="left net_mag"></a>
				<a href="http://www.bbc.co.uk/" class="left bbc"></a>
				<a href="http://digg.com/" class="left digg"></a>
				<div class="cl">&nbsp;</div>
			</div>
			<!-- end feature-in widget -->
			
			<!-- ads -->
			<div class="entry">
				<h2 class="title">Advertisments</h2>
				<a href="http://htmlmafia.com" class="ads"><img src="/content/images/htmlmafia.gif" alt="" /></a>
				<a href="http://mailbakery.com" class="ads"><img src="/content/images/mailbakery.gif" alt="" /></a>
			</div>
			<!-- end ads -->
			
		</div>
		<!-- end sidebar -->
		
		<div class="cl">&nbsp;</div>
	</div>
</div>
<!-- end main -->
		<!-- footer push -->
		<div id="footer-push" class="notext">&nbsp;</div>
		<!-- end footer push -->
</asp:Content>
